// Package repository
// @Author zhongxc
// @Date 2024/7/19 14:45:00
// @Desc
package repository

import (
	"context"
	"vben-admin/pkg/model"
)

type RoleRepo interface {
	CreateRole(ctx context.Context, role *model.RoleModel) error
	UpdateRoleById(ctx context.Context, id int64, role map[string]any) error
	GetRoleById(ctx context.Context, id int64) (*model.RoleModel, error)
	DeleteRoleByIds(ctx context.Context, ids []int64, data map[string]any) error
	GetRoleList(ctx context.Context, name string, status int32) ([]*model.RoleQueryModel, error)
	FindByName(ctx context.Context, name string) (*model.RoleModel, error)
	FindByCode(ctx context.Context, code string) (*model.RoleModel, error)
	CreateRoleWithPermissions(ctx context.Context, role *model.RoleModel, perms []*model.RoleMenuModel) error
	DeleteRoleMenuTX(ctx context.Context, roleId []int64, data map[string]any) error
}
